home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / UUPC3 / (MAIL__) / MACINIT.C next >
Text File  |  1991-07-25  |  419b  |  29 lines

  1. /*            macinit.c
  2.  
  3.  
  4.  
  5.  
  6. */
  7.  
  8. #ifdef THINK_C
  9. # include "unixlibproto.h"
  10. #endif THINK_C
  11.  
  12. #include    <stdio.h>
  13.  
  14.  
  15. macinit()
  16. {
  17.     SysEnvRec SysEnv;
  18.     int i;
  19.     
  20.     SysEnvirons(1, &SysEnv);
  21.     
  22.     if ((i = OpenRFPerm("\pUUPC Settings", 0, fsRdPerm)) == -1 &&
  23.         (i = OpenRFPerm("\pUUPC Settings", SysEnv.sysVRefNum, fsRdPerm)) == -1) {
  24.         fprintf( stderr, "ERROR: Can't find \"UUPC Settings\" file here or in System Folder\r" );
  25.     }
  26.     return 0;
  27. }
  28.  
  29.